<%@ Control Language="VB" AutoEventWireup="false" CodeFile="Menu.ascx.vb" Inherits="UserCuntrols_Menu" %>

<script language="javascript" type="text/javascript">
    var oLocation;
    var oParentID = new Array();
    OpenSubMenu = function(oBj){
        var pars = "ParentID="+oBj.id;
        oParentID = new Array();
        oLocation = 'p_'+oBj.id;
        var url = "<%= ResolveUrl("~/HigherorderMenu.aspx")%>?Container="+oLocation+"&"+pars;
        $(oLocation).innerHTML = '<div id="loader" style="padding-top:30px;" align="center"><img src="<%=ResolveUrl("~/images/loading-spinner.gif") %>" alt="Loading..." /><span id="loaderText">Loading...</span></div>';
						
        $('ifHid').src = url;
    };
    OpenSubMenuNews = function(oBj){
        oParentID = new Array();
        oLocation = 'p_'+oBj.id;
        var url = '<%= ResolveUrl("~/News/RecentNews.aspx")%>?Container='+oLocation;
        $(oLocation).innerHTML = '<div id="loader" style="padding-top:30px;" align="center"><img src="<%=ResolveUrl("~/images/loading-spinner.gif") %>" alt="Loading..." /><span id="loaderText">Loading...</span></div>';
						
        $('ifHid').src = url;
    };
    reportError = function(Result){
        alert(Result.responseText);
    };
    OpenHigherorderMenu = function(oBj,PaID){
        var pars = "SubMenu=1&ParentID="+oBj.id;
        
        oParentID[oParentID.length]=PaID;
        
        var url = "<%= ResolveUrl("~/HigherorderMenu.aspx")%>?Container="+oLocation+"&"+pars;
        $(oLocation).innerHTML = '<div id="loader" style="padding-top:30px;" align="center"><img src="<%=ResolveUrl("~/images/loading-spinner.gif") %>" alt="Loading..." /><span id="loaderText">Loading...</span></div>';
        $('ifHid').src = url;
    };
    Back = function(){
        oPaID = oParentID[oParentID.length - 1];
        oParentID.length = oParentID.length - 1;
        var pars;
        if(oParentID.length > 0)
            pars = "SubMenu=1&ParentID="+oPaID;
        else
            pars = "ParentID="+oPaID;         
        
        
        var url = "<%= ResolveUrl("~/HigherorderMenu.aspx")%>?Container="+oLocation+"&"+pars;
        $(oLocation).innerHTML = '<div id="loader" style="padding-top:30px;" align="center"><img src="<%=ResolveUrl("~/images/loading-spinner.gif") %>" alt="Loading..." /><span id="loaderText">Loading...</span></div>';
        $('ifHid').src = url;
    };
</script>

<asp:Literal ID="litLeftMenu" runat="server"></asp:Literal>
<div style="width:100%;height:1px;border-top:1px solid #69A1BF;margin-top:1px;z-index:101;"></div>
<iframe id="ifHid" style="display:none"></iframe>